<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>建议</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="${s.base}/js/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="${s.base}/css/base/base.css" media="all" /></head>

<body class="childrenBody">
<form class="layui-form">
	<input type="hidden" id="id" name="id" value="${webAdvise.id}" />
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;标题</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" disabled value="${webAdvise.title}" placeholder="请输入标题" lay-verify="required" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;手机号</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" disabled value="${webAdvise.phone}" placeholder="请输入手机号" lay-verify="required" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;地址</label>
		<div class="layui-input-block">
			<textarea class="layui-textarea" disabled lay-verify="content" placeholder="请输入地址">${webAdvise.address}</textarea></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;投诉内容</label>
		<div class="layui-input-block">
			<textarea class="layui-textarea" disabled lay-verify="content" placeholder="请输入投诉内容">${webAdvise.content}</textarea></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;附件</label>
		<div class="layui-input-block" id="showPicture">
			<#list webAdvise.fileList as file>
				<div class="imageShow" data-show-path="${file}" style="width: 120px;height: 120px;float: left; margin: 5px; border:1px #8a8a8a solid;">
					<img src="${file}" style="width: 100%;height: auto;"/>
				</div>
			</#list>

			<div style="clear: both;"></div>
		</div>
	</div>
	<#if webAdvise.status=="1">
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;状态</label>
		<div class="layui-input-block">
			<select class="form-control" name="status" lay-verify="required" id="status"></select>
		</div>
	</div>
		<#else>
			<div class="layui-form-item layui-row layui-col-xs12">
				<label class="layui-form-label">
					<span class="red">*</span>&nbsp;&nbsp;状态</label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" disabled value="已处理" /></div>
			</div>
			<div class="layui-form-item layui-row layui-col-xs12">
				<label class="layui-form-label">
					<span class="red">*</span>&nbsp;&nbsp;处理时间</label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" disabled value="${webAdvise.updateTime?string('yyyy-MM-dd HH:mm:ss')}" /></div>
			</div>
	</#if>
	<div class="layui-form-item layui-row layui-col-xs12">
		<div class="layui-input-block">
			<#if webAdvise.status=="1">
			<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="submitBtn">确定</button>
			</#if>
			<button type="reset" class="layui-btn layui-btn-sm layui-btn-primary cancel">取消</button></div>
	</div>
</form>
<script type="text/javascript" src="${s.base}/js/layui/layui.js"></script>
<script type="text/javascript" src="${s.base}/js/base/base.js"></script>
<script type="text/javascript">layui.use(['form', 'jquery', 'baseUtil', 'pageUtil'],
    function() {
        var form = layui.form,
            $ = layui.jquery,
            baseUtil = layui.baseUtil,
            pageUtil = layui.pageUtil;

        pageUtil.initDict("base_operate_status",
            function(dictData) {
                pageUtil.showDict($("#status"), pageUtil.aceeptDictContentList(dictData, "base_operate_status"), "", '${webAdvise.status}');
            });
        form.on('submit(submitBtn)',
            function(data) {
                baseUtil.postMethodResult("/webAdvise/addOrUpdate", data.field,
                    function(result) {
                        parent.location.reload();
                    });
                return false;
            });
    });</script>
</body>

</html>